package webservice.clientelogisticamonitoreo;

import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;

import org.apache.log4j.Logger;

import webservice.LogisticaMonitoreoBeanServiceLocator;
import webservice.LogisticaMonitoreoWS;

public class ClienteLogisticaMonitoreo {
	
	static Logger log = Logger.getLogger(ClienteLogisticaMonitoreo.class);
	
	public static String informarLog(String mensaje, String wsdlURL) throws ServiceException, RemoteException{
		

		LogisticaMonitoreoBeanServiceLocator locator = new LogisticaMonitoreoBeanServiceLocator();
		locator.setLogisticaMonitoreoWSPortEndpointAddress(wsdlURL);
		LogisticaMonitoreoWS port = locator.getLogisticaMonitoreoWSPort();

		//INFORMARLOG
		String respuesta = port.informarLog(mensaje);


        return respuesta;
        
	}

	public static String informarVenta(String mensaje, String wsdlURL) throws ServiceException, RemoteException{
		
		LogisticaMonitoreoBeanServiceLocator locator = new LogisticaMonitoreoBeanServiceLocator();
		locator.setLogisticaMonitoreoWSPortEndpointAddress(wsdlURL);
		LogisticaMonitoreoWS port = locator.getLogisticaMonitoreoWSPort();

		//INFORMARVENTAS
		String respuesta = port.informarVenta(mensaje);


        return respuesta;
        
	}
	
}
